<?php
if(isset($_COOKIE["shoppingcart_id"]))
     {
     //the user already has a shopping cart
     }
else
     {
     //the user does not have a shopping cart.
     }
?>